# -*- coding: utf-8 -*-
from fastapi import HTTPException, Header
from config.config import SECRET_KEY

def validate_authorization(authorization: str = Header(None)):
    if not authorization:
        raise HTTPException(status_code=401, detail="Authorization header is required")
    if authorization != SECRET_KEY:
        raise HTTPException(status_code=403, detail="Invalid Authorization header")
    return authorization